<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css" />
<link type="text/css"
	href="${pageContext.request.contextPath}/themes/icon.css"
	rel="stylesheet">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
<title>登陆</title>
</head>
<script type="text/javascript">
$(function(){
	
	$("#login").panel({    
		  width:450,    
		  height:400,    
		  title: '用户登陆',
	
		  });
	$('#inputAccount').textbox({      
	    iconCls:'icon-man', 
	    iconAlign:'left' ,
	    prompt:"请输入账户名"
	});
$('#inputPsw').textbox({      
	    iconCls:'icon-lock', 
	    iconAlign:'left' ,
	    prompt:"请输入登陆密码"                                                                                                                                                                                                                                                                                                                                                         
	});
	$('#btnLogin').linkbutton({    
	     width:150,
	     height:35,
	     onClick:function(){
	   $('#formlogin').submit(); 
			}
	});		

	$('#formlogin').form({    
	    url:'User_login',       
	    success: function(data){
	    	if(data=="1"){
			   location.href="Main_main";
			}else{
		   $.messager.alert('提示','信息有误，请重新输入！','info');  
				$('#inputPsw').textbox('clear',true);
		} 
	    }
	});       
	
	//回车事件
	   $('#formlogin').bind('keyup', function(event) {
           if (event.keyCode == '13') {
        	   $('#formlogin').submit(); 
           }
       }); 	
	
	//光标定位
	if($('#inputAccount').textbox('getText')==""){
		$('#inputAccount').textbox('textbox').focus();  
	}else{
		$('#inputPsw').textbox('textbox').focus();  
	}
	
	            
})
</script>
<body>
    <div >
<div style="color:#6699CC;margin-left:5%">
<h2>物流配送系统</h2>
</div>
<div style="margin-top:5%;margin-left:35%">
<div id="login" style="padding:10px">
<div style="padding-top:80px;padding-left:80px">
<form id="formlogin">
   <input id="inputAccount" type="text" name="user.uroot" style="width:280px;height:38px;" value="${cookie.name.value}"><br/><br/><br/>
   <input id="inputPsw" type="password" name="user.upassword" style="width:280px;height:38px;" value="${cookie.psw.value}"><br/><br/>
   <input type="checkbox" id="check" name="check" /><span>记住我</span> <br/><br/><br/>
   <a id="btnLogin" href="#" style="margin-left:16%">登陆</a><br/><br/><br/>
   <a href="#" id="a1" style="color:#6699CC;padding-left:30px">忘记密码</a>
   <a href="#" id="a2" style="color:#6699CC;padding-left:100px">新用户注册</a>
</form>
</div>
</div>
</div>
</div>
</body>
</html>